package com.team.kgc.grade.controller;

import com.team.kgc.grade.entity.Grade;
import com.team.kgc.grade.service.GradeService;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class GradeController {
     @Autowired
    private GradeService gradeService;
     @RequestMapping("showGrade")
     public String getAllGrade(Model model){

         List<Grade> grade = gradeService.getAllGrade();
         model.addAttribute("gli",grade);
         return "addStudent";
     }

}
